Skip to content

Conversation

@aphitorite
Copy link
Collaborator

Similar case that separates Optimized Gnome from Insertion.
The total amount of writes can be halved by inserting the item down the heap instead of swapping.

Changed:
Max Heap
Min Heap
Flipped Min Heap
Ternary Heap

Unchanged:
Weak Heap - makes the implementation a lot less intuitive
Poplar Heap - doesn't directly improve the sort

@MusicTheorist MusicTheorist added enhancement New feature or request needstime Issue will be fixed in the future labels Jun 16, 2020
@landfillbaby
Copy link

landfillbaby commented Jul 21, 2020

this looks good to me, and i think something similar could be applied to other selection sorts as well.
the issue is, do we change the workings of the existing sorts, or add them as separate optimized versions? i assume that @MusicTheorist would prefer the latter, since that's why Flipped Min Heapsort exists as a separate algorithm to Min Heapsort in the first place

@MusicTheorist
Copy link
Owner

I would prefer a separate "optimized" version, yeah! Remember that we're going to better organize the sort/shuffle/distribution lists later on to cut down on the clutter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needstime Issue will be fixed in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants